import { createApp } from 'vue'
import App from './App.vue'
import less from 'less'

import Antd from 'ant-design-vue';
import 'ant-design-vue/dist/antd.css';

const app = createApp(App);
app.config.productionTip = false;

import { createRouter, createWebHistory } from 'vue-router'
import Home from "./views/Home.vue"
import Login from "./views/Login.vue"
import ColumnDetail from "./views/ColumnDetail.vue"

const routerHistory = createWebHistory() // 引入路由方式
const router = createRouter({
    history: routerHistory, // 表示接入哪种类型的路由
    routes: [ // 定义路由信息
        {
            path: '/',
            name: 'home',
            component: Home
        },
        {
            path: '/login',
            name: 'login',
            component: Login
        },
        {
            path: '/column/:id', // 冒号后面表示传的动态参数
            name: 'column',
            component: ColumnDetail
        }
    ]

})


app.use(less).use(Antd).use(router).mount('#app');